package com.project.nimsen.weixin.bean;

import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;

/**
 * 接收语音信息类
 * */
public class MediaRMsg extends BaseResourceRMsg {
	private String format;//语音格式

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	protected String info() {
		StringBuffer info = new StringBuffer(super.info());
		info.append("<Format><![CDATA[").append(this.getFormat()).append("]]></Format>");
		return info.toString();
	}

	protected void fullchildProperty(Element root) {
		super.fullchildProperty(root);
		String str_format = root.elementText("Format");
		if(StringUtils.isNotBlank(str_format))
			this.setFormat(str_format);
	}
}
